
<meta charset="utf-8">
<div class="box" id="biz_cloudMember_lookup_conatainer">
	<div class="box-header with-border">
		<form id="searchForm" role="form" class="form-inline">
			<div class="form-group">
				<label>姓名</label> 
				<input name="name" v-model="searchForm.userName" type="text" placeholder="" class="form-control">
			</div>

			<div class="form-group">
				<label>类型</label> 
				<select id="userType" name="userType" v-model="searchForm.userType" class=" form-control">
					<option value="1">开发人员</option>
					<option value="2">测试人员</option>
					<option value="3">项目经理</option>
					<option value="4">管理人员</option>
				</select>
			</div>

			<button type="button" class="btn btn-info pull-right m-t-n-xs" v-on:click="search">
				<strong>查询</strong>
			</button>
		</form>
	</div>
	<div class="box-body">
				<div class="btn-group " id="cloudMemberLookupTableToolbar" role="group">
					<button type="button" v-kperms="{perm:''}" class="btn btn-default" v-on:click="doConfirm">
						<i class="glyphicon glyphicon-plus" aria-hidden="true"></i> 确认选择
					</button>
					</div>
				<table id="cloudMemberLookupBootstrapTable" data-mobile-responsive="true"></table>
			
</div>
</div>
<script>
new Vue({  
	  el: '#biz_cloudMember_lookup_conatainer',
	  data:{
		  searchForm:{
			  userName: null,
			  userType: null
		  },
		  bus:new Vue()
	  },
	  mounted:function(){
		  var _this=this;
		  _this.initTable();
	  },
    methods: {
  	  initTable:function(){
  		var _this=this;
  		var columns=[
  					{checkbox:true},
  					{field:'user_name',title:'名称',width:160,sortable:true},
					{field:'user_type',title:'人员类型',width:60,formatter:_this.formatType},
					{field:'position_level',title:'等级',width:100}];
  		  
  		  
  		  var url="/pmp/service/pub/pmpCloudMember/loadPmpCloudMemberDataSet";
    		zfesBstable.laodTable($("#cloudMemberLookupBootstrapTable"),$("#searchForm"),$("#cloudMemberLookupTableToolbar"),url,columns,this.searchForm);
  	  },
  	  search:function(){
  		  zfesBstable.reload($("#cloudMemberLookupBootstrapTable")); 
  	  },
  	  refresh:function(){
  		  zfesBstable.refresh($("#cloudMemberLookupBootstrapTable"));
  	  },
	  doConfirm: function(){
	  		if (zfesBstable.isSelectedRow($("#cloudMemberLookupBootstrapTable"))) {
				var rows = zfesBstable.getSelections($("#cloudMemberLookupBootstrapTable"));
				zfesLayerEditDg.setCallBackParam(rows);
				zfesLayerEditDg.close();
			}
	  	  },
  	  formatType:function(value, row, index){
  		if("1"==value){return '[开发人员]';}else if("2"==value){return '[测试人员]';}else if("3"==value){return '[项目经理]';}else{return '[管理人员]';}
  	}
   	
   }

});
</script>


